<?php if (!defined('THINK_PATH')) exit(); /*a:5:{s:65:"E:\www\paobanglang\nav/../application/admin\view\express\set.html";i:1506474362;s:63:"E:\www\paobanglang\nav/../application/admin\view\Main\menu.html";i:1514443605;s:67:"E:\www\paobanglang\nav/../application/admin\view\Public\header.html";i:1512184095;s:70:"E:\www\paobanglang\nav/../application/admin\view\Main\menu_footer.html";i:1510984673;s:67:"E:\www\paobanglang\nav/../application/admin\view\Public\footer.html";i:1516863870;}*/ ?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>后台管理</title>
   
    <link rel="stylesheet" href="__STATIC__/admin/css/amazeui.min.css" />
    <link rel="stylesheet" href="__STATIC__/admin/css/admin.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/style.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/pintuer.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/app.css">
    <script src="__STATIC__/admin/js/jquery.min.js"></script>
    <script src="__STATIC__/admin/js/amazeui.min.js"></script>
    <script src="__STATIC__/admin/js/pintuer.js"></script>
    <script src="__STATIC__/admin/js/app.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/layer/layer.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/laydate/laydate.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/laytpl/laytpl.js"></script>
</head>
<body>
<header class="am-topbar am-topbar-inverse admin-header">
    <div class="am-topbar-brand">
        <a href="javascript:;" class="tpl-logo">
            <img src="__STATIC__/admin/images/logo.png">
        </a>
    </div>
    <div class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right"></div>
    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
            <!--<li title="清除缓存">
                <a href="javascript:clear_cache()" class="tpl-header-list-link">
                    清除缓存
                </a>
            </li>-->
            <li title="注销登录">
                <a href="<?php echo url('admin/login/quit'); ?>" class="tpl-header-list-link">
                    <span class="am-icon-sign-out tpl-header-list-ico-out-size"></span>
                </a>
            </li>
        </ul>
    </div>
</header>
<div class="tpl-page-container tpl-page-header-fixed">
    <div class="tpl-left-nav tpl-left-nav-hover" style="margin-left: -10px">
        <div class="tpl-left-nav-title">
            导航列表
        </div>
        <div class="tpl-left-nav-list">
            <ul class="tpl-left-nav-menu">
                <?php foreach($menu_list as $menu): ?>
                    <li class="tpl-left-nav-item">
                        <?php 
                            $b = 0;
                            foreach($menu['child'] as $k => $v){
                                if (strtolower(request()->controller().'/'.request()->action()) == $v['url']){
                                    $b = 1;
                                    break;
                                }
                            }
                           //dump($menu['child']);
                         ?>
                        <a class="nav-link tpl-left-nav-link-list" <?php if($b == 1): ?> class="active" <?php endif; ?>>
                            <i class="<?php echo $menu['icon']; ?>"></i>
                            <span><?php echo $menu['name']; ?></span>
                            <?php if(count($menu['child']) > 0): ?>
                                <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                            <?php endif; ?>
                        </a>
                        <?php if(count($menu['child']) > 0): ?>
                            <ul class="tpl-left-nav-sub-menu" style="display:<?php if($b != 1): ?>none<?php else: ?>block<?php endif; ?>;">
                                <li>
                                    <?php foreach($menu['child'] as $menu_child): ?>
                                        <a href="__ROOT__/admin/<?php echo $menu_child['url']; ?>" id="<?php echo request()->controller(); ?>/<?php echo request()->action(); ?>" <?php if(strtolower(request()->controller().'/'.request()->action()) == $menu_child['url']): ?> class="active"<?php endif; ?>>
                                            <i class="am-icon-angle-right"></i>
                                            <span><?php echo $menu_child['name']; ?></span>
                                            <!--<i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>-->
                                        </a>
                                    <?php endforeach; ?>
                                </li>
                            </ul>
                        <?php endif; ?>
                    </li>
                <?php endforeach; ?>
            </ul>
        </div>
    </div>
</div>

<style>
    .am-dropdown{
        width: 100%;
        padding-left: 30px;
        margin-bottom: 10px;
    }
    .am-dropdown div{
        color: #000;
    }
</style>
<div class="tpl-content-wrapper">
<form method="post">
    <div class="panel admin-panel" style="background: #fff">
        <div class="panel-head"><strong><?php echo lang('currency')['list']; ?></strong></div>
        <div class="padding border-bottom">
            <script>
            //city 参数和回调
            var pid="<?php echo input('get.pid'); ?>";
            var cid="<?php echo input('get.cid'); ?>";
            var aid="<?php echo input('get.aid'); ?>";
            var selectc = true;
            var selecta = true;
            function select_p(){
                return false;
            }
            function select_c(){
                return false;
            }
            function select_a(){
                location.href="?pid="+pid+"&cid="+cid+"&aid="+aid;
            }
        </script>
        <input type="button" class="button button-small checkall" name="checkall" checkfor="id" value="<?php echo lang('currency')['all_select']; ?>" onclick="Select_All()" />
        <a type="button" class="button button-small border-green" href="javascript:edit('__URL__/set_edit.html')" /><?php echo lang('currency')['add']; ?></a>
        <a id="select_del" type="button" class="button button-small border-red" /><?php echo lang('currency')['del']; ?></a>
    </div>
    <table class="am-table am-table-striped am-table-hover table-main">
        <tr>
            <th width="60"><?php echo lang('label')['select']; ?></th>
            <th width="100"><?php echo lang('label')['name']; ?></th>
            <th width="200">描述</th>
            <th width="100"><?php echo lang('label')['handle']; ?></th>
        </tr>
        <?php if(is_array($data) || $data instanceof \think\Collection || $data instanceof \think\Paginator): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$express): $mod = ($i % 2 );++$i;?>
        <tr>
            <td ><input type="checkbox" name="box" value="<?php echo $express['id']; ?>" /></td>
            <td style="line-height:40px"><?php echo $express['name']; ?></td>
            <td style="line-height:40px;max-width: 200px"><?php echo $express['description']; ?></td>
            <td style="line-height:40px">
                <a class="button border-blue button-little" href="javascript:edit('__URL__/set_edit.html?id=<?php echo $express['id']; ?>')">编辑</a>
                <a class="button border-green button-little" href="javascript:set_edit('__URL__/set_relevance.html?id=<?php echo $express['id']; ?>')">关联</a>
                <a class="button border-yellow button-little" href="__URL__/set_del.html?id=<?php echo $express['id']; ?>&page=<?php echo input('get.page'); ?>" onclick="if(confirm('删除？')){return true;}return false;"><?php echo lang('currency')['del']; ?></a>
            </td>
        </tr>
        <?php endforeach; endif; else: echo "" ;endif; ?>
    </table>
</div>
</form>
<script>
    $('#select_del').click(function(){
        var str="";
        $("input:checkbox[name=box]:checked").each(function(){
            str+=$(this).val()+",";
        });
        if(str!=''){
            if(confirm('<?php echo lang('currency')['del']; ?>?')){
                location.href='__URL__/set_del.html?id='+str;
            }
        }
    });
    function edit(url) {
        layer.open({
            type:2,
            title:' ',
            area: ['80%', '90%'],
            content:url
        })
    }
    function set_edit(url) {
        layer.open({
            type:2,
            title:'',
            area: ['450px', '208px'],
            content:url
        })
    }
</script>
</div>
<script src="__STATIC__/admin/js/jquery.min.js"></script>
<script src="__STATIC__/admin/js/amazeui.min.js"></script>
<script src="__STATIC__/admin/js/pintuer.js"></script>
<script src="__STATIC__/admin/js/app.js"></script>
<script type="text/javascript" src="__STATIC__/admin/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/admin/layer/extend/layer.ext.js"></script>
<script type="text/javascript" src="__STATIC__/admin/laydate/laydate.js"></script>
<script type="text/javascript" src="__STATIC__/admin/laytpl/laytpl.js"></script>
<script>
    $('.upload').on('click',function (){
            var id = $(this).attr('data-id');
            upload(id);
        }
    );
    function upload(id){
        layer.open({
            type:2,
            title:false,
            area: ['70%', '90%'],
            offset: '5%',
            content: "<?php echo url('/admin/material'); ?>?id="+id
        });
    }
</script>
<?php if(request()->isPost()): ?>
<script>
    layer.msg('操作完成！');
    setTimeout(function (){
        parent.window.location.href = parent.window.location.href;
    },800);
</script>
<?php endif; ?>
</body>
</html>